﻿@model MvcApplication4.Models.tb_UBS

@{
    ViewBag.Title = "Cadastrar UBS";
}

<h2>Cadastrar UBS</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Cadastro UBS</legend>

       @* <div class="editor-label">
            @Html.LabelFor(model => model.ID_UBS)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ID_UBS)
            @Html.ValidationMessageFor(model => model.ID_UBS)
        </div> *@

        <div class="editor-label">
            @Html.LabelFor(model => model.Nome_UBS, "Nome UBS")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Nome_UBS)
            @Html.ValidationMessageFor(model => model.Nome_UBS, "Digite o nome da UBS")
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Endereco, "Endereço")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Endereco)
            @Html.ValidationMessageFor(model => model.Endereco, "Digite o endereço")
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Bairro, "Bairro")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Bairro)
            @Html.ValidationMessageFor(model => model.Bairro, "Digite o bairro")
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Cidade, "Cidade")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Cidade)
            @Html.ValidationMessageFor(model => model.Cidade, "Digite o cidade")
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Estado, "Estado")
        </div>
        <div class="editor-field">
            @Html.DropDownList("Estado")
            @Html.ValidationMessageFor(model => model.Estado, "Selecione o Estado")
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Telefone, "Telefone")
        </div>
        <div class="editor-field">
            @*@Html.EditorFor(model => model.Telefone)*@
            @{ Html.Syncfusion().MaskEditTextBoxFor(model=>model.Telefone).Mask("(99)99999-9999").Render(); }
            @Html.ValidationMessageFor(model => model.Telefone, "Digite o telefone")
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Email, "Email (Opcional)" )
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Email)
            @Html.ValidationMessageFor(model => model.Email, "Digite o email no formato nome@email.com")
        </div>

        <p>
            <input type="submit" value="Salvar" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
